<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    

    <title>第 6 页 | 钱猛的个人博客</title>
    <meta name="author" content="钱猛">
    
    <meta name="description" content="钱猛的个人博客。全栈发展向。无所谓做什么，只要是当前最感兴趣的事！随心、随性、随缘！">
    
    
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    
    <meta property="og:site_name" content="钱猛 &amp; 博客"/>

    
    <meta property="og:image" content="undefined"/>
    

    <link rel="icon" type="image/png" href="/qianmeng/favicon.png">
    <link rel="alternate" href="/qianmeng/atom.xml" title="钱猛 &amp; 博客" type="application/atom+xml">
    <link rel="stylesheet" href="/qianmeng/css/lib/materialize.min.css">
    <link rel="stylesheet" href="/qianmeng/css/lib/font-awesome.min.css">
    <link rel="stylesheet" href="/qianmeng/css/style.css" media="screen" type="text/css">

    
        <link rel="stylesheet" href="/qianmeng/css/lib/prettify-tomorrow-night-eighties.css" type="text/css">
    
    <!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
	<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?fc7f849e9fbb3ea12b2683af4ccaa000";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

</head>


<body>
    <img src="/weixin_favicon.png" style="position: absolute; left: -9999px; opacity: 0; filter: alpha(opacity=0);">

    <nav class="indigo">
    <div class="nav-wrapper">
        <a href="#" data-activates="main-menu" class="button-collapse">
            <i class="fa fa-navicon"></i>
        </a>
        <div class="">
            <a href="/" class="brand-logo hide-on-med-and-down">钱猛 &amp; 博客 | 
			<span style="color:#E91E63;font-size:18px;">
			<i class="fa fa-flag"></i><span id="busuanzi_value_site_pv"></span>. 
			<i class="fa fa-user"></i><span id="busuanzi_value_site_uv"></span>
			</span> 
			</a> 
            <ul class="right hide-on-med-and-down">
                
                    <li>
                        <a class="menu-home " href="/qianmeng" >
                            <i class="fa fa-home "></i>
                            
                            首页
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-archive " href="/qianmeng/archives" >
                            <i class="fa fa-archive "></i>
                            
                            归档
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-category category-menu" href="javascript:;" data-activates="category-menu" >
                            <i class="fa fa-bookmark "></i>
                            
                            分类
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-tag " href="/qianmeng/tags" >
                            <i class="fa fa-tag "></i>
                            
                            标签
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-reading " href="/qianmeng/reading" >
                            <i class="fa fa-book "></i>
                            
                            读书
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-about " href="/qianmeng/about" >
                            <i class="fa fa-user "></i>
                            
                            关于
                        </a>
                    </li>
                
                    <li>
                        <a class="menu-search modal-trigger " href="#search" >
                            <i class="fa fa-search "></i>
                            
                            搜索
                        </a>
                    </li>
                
            </ul>
            <div>
    <ul class="side-nav indigo darken-1" id="main-menu">
        
        <li class="side-user">
            <div class="row">
                <div class="col s4 no-padding">
                    <img class="avatar-image circle responsive-img" src="https://raw.githubusercontent.com/qianmeng/resources/master/head.jpg" alt="User Avatar">
                </div>
                <div class="info col s8 valign-wrapper no-padding">
                    <div class="valign">
                        <p class="name">钱猛</p>
                        <p class="desc">全栈工程师</p>
                    </div>
                </div>
            </div>
        </li>
        

        
            <li class="no-padding">
                <a class="waves-effect menu-home " href="/qianmeng" >
                    <i class="fa fa-home "></i>
                    
                    首页
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-archive " href="/qianmeng/archives" >
                    <i class="fa fa-archive "></i>
                    
                    归档
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-category category-menu" href="javascript:;" data-activates="category-menu" >
                    <i class="fa fa-bookmark "></i>
                    
                    分类
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-tag " href="/qianmeng/tags" >
                    <i class="fa fa-tag "></i>
                    
                    标签
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-reading " href="/qianmeng/reading" >
                    <i class="fa fa-book "></i>
                    
                    读书
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-about " href="/qianmeng/about" >
                    <i class="fa fa-user "></i>
                    
                    关于
                </a>
            </li>
        
            <li class="no-padding">
                <a class="waves-effect menu-search modal-trigger " href="#search" >
                    <i class="fa fa-search "></i>
                    
                    搜索
                </a>
            </li>
        
    </ul>

    <ul class="side-nav indigo darken-1" id="category-menu">
    

            

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/总结/">
                    总结 <span class="right">9 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/个人总结/">
                    个人总结 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/会展总结/">
                    会展总结 <span class="right">3 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/个人技能/">
                    个人技能 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/公司管理/">
                    公司管理 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/总结/编程经验/">
                    编程经验 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/面试/">
                    面试 <span class="right">6 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/面试/Android/">
                    Android <span class="right">3 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/面试/Python/">
                    Python <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/面试/web/">
                    web <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/面试/前端/">
                    前端 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/前端/">
                    前端 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/前端/AngularJs/">
                    AngularJs <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/后台/">
                    后台 <span class="right">5 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/Apache-CXF/">
                    Apache-CXF <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/Apache-Http-Server/">
                    Apache-Http-Server <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/Ehcache/">
                    Ehcache <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/Hibernate/">
                    Hibernate <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/后台/MetaQ/">
                    MetaQ <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/架构/">
                    架构 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/架构/Hexo/">
                    Hexo <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/量化交易/">
                    量化交易 <span class="right">5 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/量化交易/Matlab/">
                    Matlab <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/量化交易/股票/">
                    股票 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/量化交易/爬虫/">
                    爬虫 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/量化交易/期货/">
                    期货 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/数据库/">
                    数据库 <span class="right">5 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/数据库/PostGreSQL/">
                    PostGreSQL <span class="right">5 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/Android/">
                    Android <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/Android/Vollery/">
                    Vollery <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/IOS/">
                    IOS <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/IOS/itms-services/">
                    itms-services <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/网络/">
                    网络 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/网络/互联网协议/">
                    互联网协议 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/工具分享/">
                    工具分享 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/工具分享/系统工具/">
                    系统工具 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/微信/">
                    微信 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/微信/帐号区别/">
                    帐号区别 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/星座/">
                    星座 <span class="right">2 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/星座/归类/">
                    归类 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/星座/性格/">
                    性格 <span class="right">1 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-0" collapse-level="0">
                <a class="no-padding" href="/qianmeng/categories/美女/">
                    美女 <span class="right">17 篇</span></a>
                </a>
            </li>

        

            <li class="collapse-level-1" collapse-level="1">
                <a class="no-padding" href="/qianmeng/categories/美女/素人/">
                    素人 <span class="right">17 篇</span></a>
                </a>
            </li>

        

    </ul>
</div>

        </div>
    </div>
</nav>

<div id="search" class="modal search-modal">
    <div class="row">
        <div class="input-field col s12">
              <input id="search-input" type="text">
              <label for="search-input">搜索</label>
        </div>

    </div>
    <div id="search-result" class="search-result col s12">

    </div>
</div>


    <main>
        

<div class="slider">
    <ul class="slides">
    
       <li>
           <a href="http://blog.csdn.net/qian_meng" target="_blank">
               <img class="slider-image" src="/qianmeng/slider/s_csdn.jpg">
               <div class="caption center-align">
                 <h4>CSDN 博客</h3>
                 <h5 class="light grey-text text-lighten-3">钱猛的CSDN 博客地址.</h5>
               </div>
           </a>
       </li>
    
       <li>
           <a href="https://github.com/qianmeng" target="_blank">
               <img class="slider-image" src="/qianmeng/slider/s_github.jpg">
               <div class="caption left-align">
                 <h4>GitHub 地址</h3>
                 <h5 class="light grey-text text-lighten-3">钱猛的GitHub 地址.</h5>
               </div>
           </a>
       </li>
    
       <li>
           <a href="javascript:;" target="_blank">
               <img class="slider-image" src="/qianmeng/slider/s_weixin.jpg">
               <div class="caption right-align">
                 <h4>微信公众号</h3>
                 <h5 class="light grey-text text-lighten-3">扫描二维码关注钱猛的微信公众号.</h5>
               </div>
           </a>
       </li>
    
   </ul>
 </div>


<div id="article-list" class="container main-container">
    
        <article class="simple-article">
        <div class="card">
            <div class="card-content">
                <div class="article-title">
                    
    
        <h1 class="indigo-link-context"><a href="/qianmeng/2015/05/22/星座性格总结/">星座性格总结</a></h1>
    


                </div>

                <time class="pink-link-context" datetime="2015-05-22T10:06:50.000Z"><a href="/qianmeng/2015/05/22/星座性格总结/">2015-05-22</a></time>

                
    <div class="tags-row">
        
            <a href="/qianmeng/tags/总结/" class="chip pink lighten-1">总结</a>
        
            <a href="/qianmeng/tags/星座/" class="chip pink lighten-1">星座</a>
        
    </div>



                
                    <div class="entry pink-link-context">
                        <blockquote>
<p>每个人都有自己不同的性格，十二星座，十二种性格，十二种不同的人生，一切似乎是天注定，上天注定了，我们有着相合的性格，而成为朋友，成为了恋人，或成为仇人。12星座都有其自己不易显露的个性，下面来看看12星座性格<br>
                    </div>
                
            </div>

            
            <div class="card-action pink-link-context">
                <a href="2015/05/22/星座性格总结/">READ MORE</a>
            </div>
            
        </div>
</article>

    
        <article class="simple-article">
        <div class="card">
            <div class="card-content">
                <div class="article-title">
                    
    
        <h1 class="indigo-link-context"><a href="/qianmeng/2015/05/21/星座归类总结/">星座归类总结</a></h1>
    


                </div>

                <time class="pink-link-context" datetime="2015-05-21T10:06:50.000Z"><a href="/qianmeng/2015/05/21/星座归类总结/">2015-05-21</a></time>

                
    <div class="tags-row">
        
            <a href="/qianmeng/tags/总结/" class="chip pink lighten-1">总结</a>
        
            <a href="/qianmeng/tags/星座/" class="chip pink lighten-1">星座</a>
        
    </div>



                
                    <div class="entry pink-link-context">
                        <h3 id="【12星座自我价值】"><a href="#【12星座自我价值】" class="headerlink" title="【12星座自我价值】"></a>【12星座自我价值】</h3><blockquote>
<ul>
<li>白羊：只爱自己最重要,</li>
<li>金牛：带给自己和别人安全感,</li>
<li>双子：沟通技巧,巨蟹母性的关怀，</li>
<li>狮子：有目标有自信,</li>
<li>处女：细心体贴与实际,</li>
<li>天蝎：神秘的魅力,</li>
<li>天秤：让大家相处平稳顾及到每一个人，</li>
<li>射手：有点二的乐观态度,</li>
<li>摩羯：成熟及社会经验的丰富,</li>
<li>水瓶：特殊想法还有与眾不同的行為</li>
<li><p>双鱼：心地善良，天真可爱</p>
                    </div>
                
            </div>

            
            <div class="card-action pink-link-context">
                <a href="2015/05/21/星座归类总结/">READ MORE</a>
            </div>
            
        </div>
</article>

    
        <article class="simple-article">
        <div class="card">
            <div class="card-content">
                <div class="article-title">
                    
    
        <h1 class="indigo-link-context"><a href="/qianmeng/2015/04/07/PostGreSQL 中Json Array 赋值方法总结/">PostGreSQL 中Json Array 赋值方法总结</a></h1>
    


                </div>

                <time class="pink-link-context" datetime="2015-04-07T10:06:50.000Z"><a href="/qianmeng/2015/04/07/PostGreSQL 中Json Array 赋值方法总结/">2015-04-07</a></time>

                
    <div class="tags-row">
        
            <a href="/qianmeng/tags/PostGreSQL/" class="chip pink lighten-1">PostGreSQL</a>
        
            <a href="/qianmeng/tags/数据库/" class="chip pink lighten-1">数据库</a>
        
    </div>



                
                    <div class="entry pink-link-context">
                        <p>Json 数据类型在PostGreSQL中无疑是其较其他关系型数据库的一大亮点，可以存储对象，类似nosql的文档数据类型啦，当然现在MySQL的最新版本中也包含了Json数据类型，所以好好总结下Json的用法还是很有必要的，这里主要针对Json Array 的赋值方法做个小结，因为在项目中用的还蛮多。<br>
                    </div>
                
            </div>

            
            <div class="card-action pink-link-context">
                <a href="2015/04/07/PostGreSQL 中Json Array 赋值方法总结/">READ MORE</a>
            </div>
            
        </div>
</article>

    
        <article class="simple-article">
        <div class="card">
            <div class="card-content">
                <div class="article-title">
                    
    
        <h1 class="indigo-link-context"><a href="/qianmeng/2015/03/07/PostGreSQL 自动备份脚本（.backup文件格式）/">PostGreSQL 自动备份脚本（.backup文件格式）</a></h1>
    


                </div>

                <time class="pink-link-context" datetime="2015-03-07T10:06:50.000Z"><a href="/qianmeng/2015/03/07/PostGreSQL 自动备份脚本（.backup文件格式）/">2015-03-07</a></time>

                
    <div class="tags-row">
        
            <a href="/qianmeng/tags/PostGreSQL/" class="chip pink lighten-1">PostGreSQL</a>
        
            <a href="/qianmeng/tags/数据库/" class="chip pink lighten-1">数据库</a>
        
    </div>



                
                    <div class="entry pink-link-context">
                        <p>最近发布的项目操作系统使用的windows server 2012 ，数据库使用的是PostGreSQL9.4，数据库本身没有自动备份的功能，现在觉得最简单的实现方式就是利用windows的任务计划程序来每天定时的执行脚本来备份数据库。</p>
<p>网上一搜一大把，好多人都说已经用过，而且有实例，但拿下了之后不是运行不起来（不知道我系统的原因，还是版本不一致），就是不符合我想要的结果（我想要的是和PostGreSQL自带的备份功能结果一样的.backup文件格式，网上大多数rar或者sql），这里综合别人的写法和官网实例写出下面的bat文件，运行正常，做个备忘。<br>
                    </div>
                
            </div>

            
            <div class="card-action pink-link-context">
                <a href="2015/03/07/PostGreSQL 自动备份脚本（.backup文件格式）/">READ MORE</a>
            </div>
            
        </div>
</article>

    
        <article class="simple-article">
        <div class="card">
            <div class="card-content">
                <div class="article-title">
                    
    
        <h1 class="indigo-link-context"><a href="/qianmeng/2015/02/07/itms-services协议，不通过AppStore，直接安装IOS应用程序/">itms-services协议，不通过AppStore，直接安装IOS应用程序</a></h1>
    


                </div>

                <time class="pink-link-context" datetime="2015-02-07T10:06:50.000Z"><a href="/qianmeng/2015/02/07/itms-services协议，不通过AppStore，直接安装IOS应用程序/">2015-02-07</a></time>

                
    <div class="tags-row">
        
            <a href="/qianmeng/tags/IOS/" class="chip pink lighten-1">IOS</a>
        
            <a href="/qianmeng/tags/协议/" class="chip pink lighten-1">协议</a>
        
    </div>



                
                    <div class="entry pink-link-context">
                        <p>最近开发的一个IOS项目需要不通过将APP发布到Appstore上直接安装到客户手机上，本来觉得苹果这么封闭的流程，应该不可以实现的吧，结果竟然还正能实现，这边主要是利用苹果自家的浏览器safari和itms-services协议，下面介绍下主要步骤和实现过程中遇到的问题。</p>
<blockquote>
<p>通过itms-services协议，可以通过safari浏览器直接在iOS设备上安装应用程序。利用这种方式，只要在内网布置一个服务器，测试人员只需要通过测试设备的safari浏览器访问特定的url既可以实现安装</p>
</blockquote>
                    </div>
                
            </div>

            
            <div class="card-action pink-link-context">
                <a href="2015/02/07/itms-services协议，不通过AppStore，直接安装IOS应用程序/">READ MORE</a>
            </div>
            
        </div>
</article>

    
        <article class="simple-article">
        <div class="card">
            <div class="card-content">
                <div class="article-title">
                    
    
        <h1 class="indigo-link-context"><a href="/qianmeng/2014/12/07/Hibernate 映射数据库中Json字段的解决方案/">Hibernate 映射数据库中Json字段的解决方案</a></h1>
    


                </div>

                <time class="pink-link-context" datetime="2014-12-07T10:06:50.000Z"><a href="/qianmeng/2014/12/07/Hibernate 映射数据库中Json字段的解决方案/">2014-12-07</a></time>

                
    <div class="tags-row">
        
            <a href="/qianmeng/tags/Hibernate/" class="chip pink lighten-1">Hibernate</a>
        
            <a href="/qianmeng/tags/PostgreSQL/" class="chip pink lighten-1">PostgreSQL</a>
        
    </div>



                
                    <div class="entry pink-link-context">
                        <p>最近的项目ORM框架使用的是Hibernate，数据库使用PostgreSQL，俩个都是开源的高大上产品，Hibernate就不用说啦，主流的ORM框架，PostgreSQL第一次接触，其中包含Json数据类型的字段，这种类型意味着它可以像非关系型数据库那样存储数据，数据扩展性非常好，这也是项目使用它的主要原因之一。 在Hibernate和PostgreSQL的结合过程中遇到了针对Json数据类型，Hibernate并没有Json这种数据映射字段，想了下是不是版本的问题，也许高版本Hibernate已经支持这种类型啦，下载最新版本Hibernate看下啦，仍然不支持，这点不是很明白，PostgreSQL已经支持Json这么长时间啦，而且现在MySQL最新版本也已经支持Json数据格式啦，身为主流ORM框架怎么到现在还没有提供这种数据类型，不管啦，也许人家提供了其他想法，大公司的想法是我们这些吊私无法猜测的，作为我们就是寻找解决方案就可以啦，毕竟人家已经开源了嘛。<br>    毕竟这俩框架已经诞生这么长时间啦，这种常见问题肯定有了很好的解决方案，果然在stackoverflow找到了一些解决方案，这里只做整理说明，能够解决当前项目中的问题，不做深入探究。</p>
                    </div>
                
            </div>

            
            <div class="card-action pink-link-context">
                <a href="2014/12/07/Hibernate 映射数据库中Json字段的解决方案/">READ MORE</a>
            </div>
            
        </div>
</article>

    
        <article class="simple-article">
        <div class="card">
            <div class="card-content">
                <div class="article-title">
                    
    
        <h1 class="indigo-link-context"><a href="/qianmeng/2014/08/01/MetaQ 简单使用（数据同步框架）/">MetaQ 简单使用（数据同步框架）</a></h1>
    


                </div>

                <time class="pink-link-context" datetime="2014-08-01T10:06:50.000Z"><a href="/qianmeng/2014/08/01/MetaQ 简单使用（数据同步框架）/">2014-08-01</a></time>

                
    <div class="tags-row">
        
            <a href="/qianmeng/tags/Java/" class="chip pink lighten-1">Java</a>
        
            <a href="/qianmeng/tags/服务/" class="chip pink lighten-1">服务</a>
        
            <a href="/qianmeng/tags/MetaQ/" class="chip pink lighten-1">MetaQ</a>
        
    </div>



                
                    <div class="entry pink-link-context">
                        <h2 id="框架说明"><a href="#框架说明" class="headerlink" title="框架说明"></a>框架说明</h2><p><img src="http://img.blog.csdn.net/20160509211304732" alt="这里写图片描述"><br>数据同步工具用来对两个系统或者多个系统的数据进行同步处理，框架能够实现项目开发人员只需配置两边系统需的业务数据，不需要关系数据是如何实现同步的，框架底层数据传输技术使用淘宝的开源框架metamorphosis简称metaQ，该框架是使用观察者的设计模式来处理数据的中间介，发送端只需将数据发送到服务器，接收端进行监听，一旦有新数据，就立刻可以接收到。<br>
                    </div>
                
            </div>

            
            <div class="card-action pink-link-context">
                <a href="2014/08/01/MetaQ 简单使用（数据同步框架）/">READ MORE</a>
            </div>
            
        </div>
</article>

    
        <article class="simple-article">
        <div class="card">
            <div class="card-content">
                <div class="article-title">
                    
    
        <h1 class="indigo-link-context"><a href="/qianmeng/2014/07/07/Ehcache 初探（在项目中的简单使用）/">Ehcache 初探（在项目中的简单使用）</a></h1>
    


                </div>

                <time class="pink-link-context" datetime="2014-07-07T10:06:50.000Z"><a href="/qianmeng/2014/07/07/Ehcache 初探（在项目中的简单使用）/">2014-07-07</a></time>

                
    <div class="tags-row">
        
            <a href="/qianmeng/tags/服务/" class="chip pink lighten-1">服务</a>
        
            <a href="/qianmeng/tags/Ehcache/" class="chip pink lighten-1">Ehcache</a>
        
    </div>



                
                    <div class="entry pink-link-context">
                        <p>最近在开发一个android项目，项目是面向在校大学生的，据说推广起来，访问量必将很大，针对这种情况，再看看我们现在有的后台服务框架，竟然没有针对高访问量这种情况的处理，这里必定用到缓存技术，现有的框架中也最多存在Hibernate缓存的使用，但针对数据层的缓存，必然会用到Hibernate的二级缓存，竟然框架中连Hibernate的二级缓存都没用过，看到这些，想想也没有在现有的基础上做简单扩展的必要了，于是决定针对后台服务缓存这层进行研究使用。</p>
<p>在网上看到了不少缓存技术，有些比较陌生，有些不适合现有项目，还有些使用上不是很方便，最终确定选择了ehcache，发现Hibernate的二级缓存就是使用Ehcache实现的，但毕竟是嵌套在Hibernate框架中的，使用的灵活性就大打折扣了，例如Hibernate的二级缓存对于查询列表只能针对固定不变的结果数据进行缓存，另外不支持对缓存的动态添加修改，Ehcache本身单独就是很强大，于是决定单独提出来使用。</p>
<p>Ehcache 是现在最流行的纯Java开源缓存框架，配置简单、结构清晰、功能强大。<br>
                    </div>
                
            </div>

            
            <div class="card-action pink-link-context">
                <a href="2014/07/07/Ehcache 初探（在项目中的简单使用）/">READ MORE</a>
            </div>
            
        </div>
</article>

    

    <ul class="pagination center-align">
    <li class="">
        <a href="/qianmeng/page/5/"><i class="fa fa-angle-left"></i></a>
    </li>
    
    
        <li class="waves-effect"><a href="/">1</a></li>
    
        <li class="waves-effect"><a href="/page/2">2</a></li>
    
        <li class="waves-effect"><a href="/page/3">3</a></li>
    
        <li class="waves-effect"><a href="/page/4">4</a></li>
    
        <li class="waves-effect"><a href="/page/5">5</a></li>
    
        <li class="active pink"><a href="/page/6">6</a></li>
    
    
    <li class="disabled">
        <a href="/qianmeng/"><i class="fa fa-angle-right"></i></a>
    </li>
 </ul>

	
</div>

        <div class="fixed-action-btn float-sitemap">
    <a class="btn-floating btn-large pink">
      <i class="fa fa-caret-square-o-up"></i>
    </a>
    <ul>
      <li><a class="btn-return-top btn-floating waves-effect green" title="回到顶部"><i class="fa fa-arrow-circle-o-up"></i></a></li>
      <li><a class="btn-floating waves-effect button-collapse yellow darken-1"  data-activates="main-menu" title="menu"><i class="fa fa-navicon"></i></a></li>
    </ul>
  </div>

    </main>
    <footer class="page-footer indigo darken-1">
    
    <div class="container">
        <div class="row">
            
            <div class="social-group col m3 s12">
                <h5 class="white-text">社交</h5>
                
                    <a class="social-link" href="https://github.com/qianmeng" target="_blank">
                        <i class="fa fa-2x fa-github"></i>
                    </a>
                
                    <a class="social-link" href="http://weibo.com/u/1819068247" target="_blank">
                        <i class="fa fa-2x fa-weibo"></i>
                    </a>
                
                    <a class="social-link" href="/atom.xml" target="_blank">
                        <i class="fa fa-2x fa-rss"></i>
                    </a>
                
            </div>
            

            
            <div class="col m9 s12">
                <h5 class="white-text">友情链接</h5>
                
                    <a class="social-link" href="http://blog.csdn.net/qian_meng" target="_blank">CSDN 地址</a>
                
                    <a class="social-link" href="https://github.com/qianmeng" target="_blank">Github地址</a>
                
            </div>
            
        </div>
    </div>
    

    <div class="footer-copyright pink-link-context">
        <div class="container">
            © 2016  All rights reserved. 
        </div>
    </div>
</footer> 
<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js">
</script>


    <noscript>
    <div class="noscript">
        <p class="center-align">当前网速较慢或者你使用的浏览器不支持博客特定功能，请尝试刷新或换用Chrome、Firefox等现代浏览器</p>
    </div>
</noscript>
<div class="noscript">
    <p class="center-align">当前网速较慢或者你使用的浏览器不支持博客特定功能，请尝试刷新或换用Chrome、Firefox等现代浏览器</p>
</div>


<script src="/qianmeng/js/jquery-2.1.1.min.js"></script>
<script src="/qianmeng/js/materialize.min.js"></script>

<script>
    (function($) {
        $(document).ready(function() {
            // 隐藏禁用javascript（针对微信内置浏览器）的提示
            $('.noscript').hide();

            // 图片缩放效果
            var $imgs = $('img').not('.slider-image').not('.avatar-image').not('.carousel-image').not('.card-cover-image').not('.qrcode');

            // 给图片加上点击放大效果（materialbox插件）
            $imgs.addClass('materialboxed').each(function(i, el) {
                $(this).attr('data-caption', $(this).attr('alt') || ' ');
            }).materialbox();

            // 优化表格的显示
            $('table').each(function() {
                var $table = $(this);
                // 除去多行代码的情况
                if ($table.find('pre').length == 0) {
                    $table.addClass('responsive-table striped bordered');
                }
            });

            // 首页幻灯片
            $('.slider').slider({indicators: true, full_width: true, interval: 8000});

            $(".button-collapse").sideNav();
            $(".category-menu").sideNav();

            // 针对gallery post
            $('.carousel').carousel({full_width: true});
            $('.carousel-control.prev').click(function() {
                $('.carousel').carousel('prev');
            });
            $('.carousel-control.next').click(function() {
                $('.carousel').carousel('next');
            });

            // 文章目录
            $('article').not('.simple-article').find('h1').add('h2').add('h3').add('h4').add('h5').add('h6').scrollSpy();
            // 修正文章目录的left-border颜色
            var color = $('.table-of-contents-text').css('color');
            $('.table-of-contents-link').css('border-left-color', color);

            // 针对移动端做的优化：FAB按钮点击一下收回
            if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
                $('.fixed-action-btn').addClass('click-to-toggle');
            }
            // 回到顶部
            $('.btn-return-top').click(function() {
                $('body, html').animate({
                    scrollTop: 0
                }, 500);
            });

            // 重置读书页面的Tab标签页的颜色
            $('li.tab a').hover(function() {
                $(this).toggleClass('text-lighten-4');
            });
            $('.indicator').addClass('pink lighten-2');

            
            // 添加new标签
            $('.menu-search').append('<span class="new badge pink"></span>');
            

            // 搜索功能
            $('.modal-trigger').leanModal();
            var searchXml = "search.xml";
            if (searchXml.length == 0) {
             	searchXml = "search.xml";
            }
            var searchPath = "/qianmeng/" + searchXml;
            initSearch(searchPath, 'search-input', 'search-result');
        });

        // 初始化搜索与匹配函数
        var initSearch = function(path, search_id, content_id) {
            'use strict';
            $.ajax({
                url: path,
                dataType: "xml",
                success: function(xmlResponse) {
                    // get the contents from search data
                    var datas = $("entry", xmlResponse).map(function() {
                        return {
                            title: $("title", this).text(),
                            content: $("content", this).text(),
                            url: $("url", this).text()
                        };
                    }).get();
                    var $input = document.getElementById(search_id);
                    var $resultContent = document.getElementById(content_id);
                    $input.addEventListener('input', function() {
                        var str = '<ul class=\"search-result-list\">';
                        var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
                        $resultContent.innerHTML = "";
                        if (this.value.trim().length <= 0) {
                            return;
                        }
                        // perform local searching
                        datas.forEach(function(data) {
                            var isMatch = true;
                            var content_index = [];
                            var data_title = data.title.trim().toLowerCase();
                            var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
                            var data_url = data.url;
                            var index_title = -1;
                            var index_content = -1;
                            var first_occur = -1;
                            // only match artiles with not empty titles and contents
                            if (data_title != '' && data_content != '') {
                                keywords.forEach(function(keyword, i) {
                                    index_title = data_title.indexOf(keyword);
                                    index_content = data_content.indexOf(keyword);
                                    if (index_title < 0 && index_content < 0) {
                                        isMatch = false;
                                    } else {
                                        if (index_content < 0) {
                                            index_content = 0;
                                        }
                                        if (i == 0) {
                                            first_occur = index_content;
                                        }
                                    }
                                });
                            }
                            // show search results
                            if (isMatch) {
                                keywords.forEach(function(keyword) {
                                    var regS = new RegExp(keyword, "gi");
                                    data_title = data_title.replace(regS, "<span class=\"search-keyword pink lighten-2\">" + keyword + "</span>");
                                });

                                str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
                                var content = data.content.trim().replace(/<[^>]+>/g, "");
                                if (first_occur >= 0) {
                                    // cut out 100 characters
                                    var start = first_occur - 20;
                                    var end = first_occur + 80;
                                    if (start < 0) {
                                        start = 0;
                                    }
                                    if (start == 0) {
                                        end = 100;
                                    }
                                    if (end > content.length) {
                                        end = content.length;
                                    }
                                    var match_content = content.substring(start, end);
                                    // highlight all keywords
                                    keywords.forEach(function(keyword) {
                                        var regS = new RegExp(keyword, "gi");
                                        match_content = match_content.replace(regS, "<span class=\"search-keyword pink lighten-2\">" + keyword + "</span>");
                                    });

                                    str += "<p class=\"search-result\">..." + match_content + "...</p>"
                                }
                                str += "</li>";
                            }
                        });
                        str += "</ul>";
                        $resultContent.innerHTML = str;
                    });
                }
            });
        }
    })(jQuery);
</script>


<script src="/qianmeng/js/prettify.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $("pre").addClass("prettyprint");
        prettyPrint();
    });
</script>




<script type="text/javascript" src="http://tajs.qq.com/stats?sId=56073371" charset="UTF-8"></script>



<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
<script type="text/javascript" async
  src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>



	<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"6","bdPos":"right","bdTop":"145"},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>

</body>
</html>
